package com.itheima.api.integer.demo01;

public class IntToString {

    public static void main(String[] args) {

        int a = 1;

        String s1 = "" + a;
        System.out.println("String类型" + s1);
        String s2 = String.valueOf(2);
        System.out.println("String类型" + s2);
        System.out.println("String类型" + String.valueOf(3));
        String s3 = Integer.toString(4);
        System.out.println("String类型" + s3);
        System.out.println("String类型" + Integer.toString(5));

        System.out.println("---------------------------------");

        String s = "6";
        Integer integer = new Integer(s);
        int i = integer.intValue();
        System.out.println("int类型" + i);
        Integer integer2 = new Integer("9");
        System.out.println(integer2.intValue());
        System.out.println(new Integer("10").intValue());

        String s4 = "7";
        Integer integer1 = Integer.valueOf(s4);
        int i1 = integer1.intValue();
        System.out.println("int类型" + i1);
        Integer integer3 = Integer.valueOf("8");

    }
}
